<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>操作员查询</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"

	rel="stylesheet" />
	
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript" src="/js/jquery-1.9.1.js"></script>
<script type='text/javascript' src='<s:url value="/dwr/engine.js"/>'></script>
<script type='text/javascript' src='<s:url value="/dwr/interface/MccQuery.js"/>'></script>
<script type='text/javascript' src='<s:url value="/dwr/interface/AddressQuery.js"/>'></script>

	

<style>
　　　
　　　　　a {
	text-decoration: none
}

　　　　　a:hover {
	color: red;
	text-decoration: none
}

a:VISITED {
	color: red;
}
　　


　　　
</style>

<script type="text/javascript">

	$(document).ready(function(){
		loadSorts();
	});
	function loadSorts() {
			AddressQuery.loadProvices(function(objs){
				clearSelect("citys");
				clearSelect("banks");
				
				fillSelect_sort("provinces", objs);
				loadCity();
			});
			AddressQuery.loadPayBank( function(sortSmall) {
				clearSelect("bankBranchs");
				fillSelect_sort("banks", sortSmall);
				loadBankBranch();
			});
		}

			//加载二级类别
		//load　　city
		 function loadCity() {
			var sortCode = $("#provinces").val();
			
			if (!sortCode) {
				return;
			}
			AddressQuery.loadCitys(sortCode, function(sortSmall) {
					
				fillSelect_sort("citys", sortSmall);
				
			});
		}
		
			function loadBankBranch() {
			var b = $("#banks").val();
			var p=$("#provinces").val();
			var c=$("#citys").val();
			if (!b) {
				return;
			}
			
			AddressQuery.loadPayBankBranch(b,p,c ,function(sortSmall) {
				fillSelect_sort("bankBranchs", sortSmall);
			});
		}
		
		function clearSelect(sid) {
			$("#" + sid).empty().append("<option value=''>--请选择--</option>");
		}
		//进行遍历存值
	  	function fillSelect_sort(sid, address) {
	  	
				if (!address || !sid) {
					return;
				}
				var $select = $("#" + sid);
				$select.empty();
				if (address.length != 1) {
					$select.append("<option value=''>--请选择--</option>");
				}
				
				for ( var i = 0; i < address.length; i++) {
					$select.append("<option value='"+address[i].CODE+"'>"
							+ address[i].NAME + "</option>");
				}
		}
	
</script>



</head>

<body>

	<div class="subpage">
		<s:form id="queryForm" action="/bankinfo/queryBankInfo.ct" method="post"
			theme="simple">
			<div class="user_title">
				<h2 class="headline-inquires">
					POS收单运营管理平台<br />
					<span class="sub-title"></span>
				</h2>
			</div>
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="query_table">

				<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">
							开户行信息维护<br />
							<span class="sub-title"></span>
						</h2>

					</td>
				</tr>


				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>

                <tr>
                    <td align="right" width="15%">开户省：</td>
			    	<td><select class="queryWidth" name="searchCondition.provinceId" id="provinces" onchange="loadCity()" ></select></td>	 
				    <td align="right">开户市:</td>
				    <td><select class="queryWidth" name="searchCondition.cityId" id="citys" onchange="loadBank()"></select></td>
				</tr>
				<tr>
				   	 
					<td align="right">银行：</td>
					<td align="left" colspan="1"><select id="banks" name="searchCondition.bankId" onchange="loadBankBranch()" class="queryWidth" ></select></td>
				    <td align="right" width="15%">开户支行：</td>
			    	<td><select id="bankBranchs"  name="searchCondition.branchName" class="queryWidth"></select></td>
				</tr>	
				<tr>
						<td colspan="4" align="center"><span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;"><s:actionmessage /></span > <span style="font-color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				<tr>
					<td colspan="4" align="right"><s:submit  value="查询" />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:reset value="取  消" /> </td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">

				<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">开户行基本信息</h2>

					</td>
				</tr>
				<s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr>
						<td align="left">&nbsp;&nbsp;&nbsp;&nbsp; <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/bankinfo/queryBankInfo.ct?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
			<table id="tableList" width="100%" class="table">
				<thead>
					<tr>
						<th>省份</th>
						<th>市区</th>
						<th>银行名</th>
						<th>支行</th>
						<th>所在地区</th>
						<th>电话号码</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.searchRsList" status="stat" id="element">
							<tr class="<s:if test="#stat.index%2==0">tr_0</s:if>" >
							<td><s:property value="#element.provinceName"></s:property></td>
							<td><s:property value="#element.cityName"></s:property></td>
							<td><s:property value="#element.bankName"></s:property></td>
							<td><s:property value="#element.bankBranchName"></s:property></td>
							<td><s:property value="#element.brankAddress"></s:property></td>
							<td><s:property value="#element.telnum"></s:property></td>
						</s:iterator>
				</tbody>
			</table>
		</s:form>
	</div>
	<s:if test="#request.info_request !=null">
	<script language="javascript">
	    alert("${request.info_request}");
	    </script>
	</s:if>	
</body>
</html>
